<?php
include("../db_connect.php");
include("../class/objName.php");
$obj = new objName();
$tbl = "";
$item = "";
$brandid = "";

if(isset($_GET['brandid'])){
	
	$item = mysql_real_escape_string(htmlentities(trim($_GET['item'])));
	$brandid = mysql_real_escape_string(htmlentities(trim($_GET['brandid'])));
	$exist = $obj->ismodelexist($item,$brandid);
	 
	echo $exist;
	
}else{
	if($_GET['tbl']=="tblbrand"){
		
		$exist = $obj->isbrandexist(mysql_real_escape_string(htmlentities(trim($_GET['item']))));
		echo $exist;
	}
	else{
		$exist = $obj->ispartsexist(mysql_real_escape_string(htmlentities(trim($_GET['item']))));
		echo $exist;
	}


}






?>